home *** CD-ROM | disk | FTP | other *** search
- on LoadPeopleCat theCat, sN
- global gPeopleCategory, gPeopleRecs, gOnPC, gResourcePath
- if voidp(sN) then
- set sN to the clickOn
- end if
- hiliteAnim(sN, "P_")
- if theCat = "Movie Credits" then
- LinkTo("Movie Credits")
- else
- set gPeopleCategory to theCat
- set theLine to LineOffset(gPeopleCategory, field "PEOPLE_C")
- set gPeopleRecs to line theLine of field "PEOPLE_D"
- delete item 1 of gPeopleRecs
- createPeoplePopUps(theLine)
- LinkPeopleFromIcon(1)
- end if
- end
-
- on LinkBackToPeopleCat
- global gPeopleCategory
- LinkTo("People Menu")
- end
-
- on LinkPeopleFromIcon theSprite
- global gPeopleCategory, gPeopleRecs, gIntroBack, gPeopleState, gOnPC, gResourcePath
- spinCursor()
- set numRecs to the number of items in gPeopleRecs
- set curRecord to value(item theSprite of gPeopleRecs)
- set theAB to line 4 of gPeopleState
- if not (theAB = 1) then
- set theAB to 1
- else
- set theAB to 0
- end if
- set gPeopleState to curRecord & RETURN & theSprite & RETURN & numRecs & RETURN & theAB
- set sbTxtHdr to field "PEOPLE_0"
- set numChunks to line 1 of sbTxtHdr
- delete line 1 of sbTxtHdr
- spinCursor()
- repeat with z = 1 to the number of lines in sbTxtHdr
- set sRec to word 1 of line z of sbTxtHdr
- set eRec to word 2 of line z of sbTxtHdr
- if (curRecord >= sRec) and (curRecord <= eRec) then
- exit repeat
- end if
- end repeat
- spinCursor()
- set theLine to curRecord - sRec + 1
- debug("R: " & curRecord)
- set theData to line theLine of field ("PEOPLE_" & z)
- set the itemDelimiter to "|"
- spinCursor()
- set the itemDelimiter to "|"
- set thePerson to item 1 of theData
- set theTitle to item 2 of theData
- set theBio to putBackChars(item 3 of theData)
- set portraitPICT to item 8 of theData
- set the itemDelimiter to ","
- spinCursor()
- if not (portraitPICT = EMPTY) then
- spinCursor()
- if gOnPC then
- set the fileName of cast ("PEOPLEHS.PIC" & theAB) to gResourcePath & "PEOPLE\" & portraitPICT
- else
- set the fileName of cast ("PEOPLEHS.PIC" & theAB) to "STARGATE:RESOURCE:PEOPLE:" & portraitPICT
- end if
- end if
- spinCursor()
- put thePerson & RETURN & theTitle into field ("Person Name" & theAB)
- put theBio into field ("Person Bio" & theAB)
- set newFrame to gPeopleCategory & " BG" & theAB
- if the frame <> label(newFrame) then
- LinkTo(newFrame)
- end if
- resetCursor()
- end
-
- on prevPerson
- global gIntroBack, gPeopleState, gPeopleCategory
- set curRecord to value(line 1 of gPeopleState)
- set curItem to value(line 2 of gPeopleState)
- set maxItems to value(line 3 of gPeopleState)
- if curItem = EMPTY then
- set curItem to 1
- else
- if curItem = 1 then
- set curItem to maxItems
- else
- set curItem to curItem - 1
- end if
- end if
- LinkPeopleFromIcon(curItem)
- end
-
- on nextPerson
- global gIntroBack, gPeopleState, gPeopleCategory
- set curRecord to value(line 1 of gPeopleState)
- set curItem to value(line 2 of gPeopleState)
- set maxItems to value(line 3 of gPeopleState)
- if curItem = EMPTY then
- set curItem to 1
- else
- if (curItem > maxItems) or (curItem = maxItems) then
- set curItem to 1
- else
- set curItem to curItem + 1
- end if
- end if
- LinkPeopleFromIcon(curItem)
- end
-